package KVRMIService;

import java.rmi.*;

/**
 * Remote Interface for the KVStore
 */
public interface KVStoreInterface extends java.rmi.Remote {
	/**
	 * Function to lookup and return the value associated with a given key.
	 * 
	 * Remotely invocable method.
	 * 
	 * @return the string ID of the owner process
	 * @exception RemoteException if the remote invocation fails.
	 */
	public String lookup(int key) throws RemoteException;	
	
	/**
	 * Function to insert a given key,value pair.
	 * 
	 * Remotely invocable method.
	 * 
	 * @return void
	 * @exception RemoteException if the remote invocation fails.
	 */
	public void insert(int key, String value) throws RemoteException;
	
	/**
	 * Function to delete a given key,value pair.
	 * 
	 * Remotely invocable method.
	 * 
	 * @return void
	 * @exception RemoteException if the remote invocation fails.
	 */
	public void deleteKey(int key) throws RemoteException;
}
